#include "Mock.h"

#include "Test.h"

class TestInterface {
public:
	virtual void hallo() = 0;
	virtual void setInt(int i) = 0;
};

class TestMock : public TestInterface {
public:
	Method halloMethod;
	virtual void hallo() {
		halloMethod.call(__FUNCTION__, __FILE__, __LINE__);
	}

	MethodWithOneParam<int> setIntMethod;
	virtual void setInt(int i) {
		setIntMethod.call(__FUNCTION__, i, __FILE__, __LINE__);
	}
};

namespace {

	TEST(T1) {
		TestMock testMock;

		// record expectation
		testMock.hallo();

		Mock::recordMode = false;

		// service

		// mock
		testMock.hallo();

//		testMock.hallo();

		// verify -> TestFramework
		testMock.halloMethod.verify();
		Mock::recordMode = true;
	}
}